package com.board.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.board.dto.AccountDto;
import com.board.dto.AccountNewDto;
import com.board.dto.AdminInfoDto;
import com.board.entity.AdminInfo;
import com.board.form.UpdateAdminPassForm;
import com.board.param.AddAdminAccountParam;
import com.board.param.AdminLoginParam;
import com.board.util.PageInfo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 小叶
 * @since 2024年04月03日
 */
public interface AdminInfoService extends IService<AdminInfo> {

    //根据id查询管理员
    AdminInfoDto findAdminById(Integer adminId);

    //新增后台用户
    AccountNewDto addAdminAccount(AddAdminAccountParam toBean);

    //管理员登录
    AccountNewDto adminLogin(AdminLoginParam toBean);

    //禁用账号
    AccountDto disableAdmin(Integer adminId,Integer loginId);

    //启用账号
    AccountDto enableAdmin(Integer adminId,Integer loginId);

    //删除账号
    void deleteAdmin(Integer adminId, Integer loginId);

    //修改密码
    AccountNewDto updateAdminPass(UpdateAdminPassForm toBean, Integer loginId);

    //查询后台账号
    PageInfo<AccountDto> findAllAdmin(String adminUser, Integer pageNum, Integer pageSize);
}
